Moving average model in python